﻿using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WomanMotion.WebApi.Model.Dtos.Users;

namespace WomanMotion.WebApi.Model.Dtos
{
    /// <summary>
    /// DTO返回基类 带所有表的基本信息
    /// </summary>
    public class BaseVM
    {
        /// <summary>
        /// 主键ID
        /// </summary>
        public long Id { get; set; }

        /// <summary>
        /// 创建人
        /// </summary>
        public long Createdby { get; set; }

        /// <summary>
        ///创建人对象
        /// </summary>
        [Navigate(NavigateType.OneToOne, nameof(Createdby))]
        public UserVM? CreatedUsers { get; set; } //不能赋值只能是null

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime Createdtime { get; set; }

        /// <summary>
        /// 更新人
        /// </summary>
        public long Updatedby { get; set; }

        /// <summary>
        /// 更新人对象
        /// </summary>
        [Navigate(NavigateType.OneToOne, nameof(Updatedby))]
        public UserVM? UpdatedUsers { get; set; } //不能赋值只能是null

        /// <summary>
        /// 更新时间
        /// </summary>
        public DateTime Updatedtime { get; set; }

        /// <summary>
        /// 是否禁用;1代表启用，0代表禁用
        /// </summary>
        public int Ifdisable { get; set; }
    }
}